<?php $this->load->view('teacher_home/_header') ?>
<?php $this->load->view('message') ?>
<head>
<script type="text/javascript">
  $().ready(function(){
    $("#knowledge_point_li").addClass("active");

    $('.selectpicker').selectpicker();   
  });

  function check_button_click()
  	{
  		var id=$(".selectpicker").val();
  		if(id!='0')
  			location.href="<?php echo site_url('teacher_knowledge_point/check').'/'?>"+id;
  	}

</script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    </head>
<div class="container">
	<div class="panel panel-primary">
		<div class="panel-heading">
			<h3 class="panel-title">知识点内容</h3>
		</div>
		<div class="panel-body">
			<div class="col-lg-9">	
				<div style="font-weight:bold; position:relative; ">
					相关考点：<?php					
						echo $test_point['content'];					
				?><br>
				</div>			
				<div style="font-weight:bold; position:relative; ">
					知识点：<?php
					if(!is_numeric($knowledge_point['content']))
					{
						echo $knowledge_point['content'];
					}
				?><br>
				</div>
				
				<?php if ($knowledge_point['explanation']): ?>
					<p class="text-info col-xs-offset-1" >解释： <?php echo $knowledge_point['explanation'];?></p>
				<?php endif ?>
				<?php if ($knowledge_point['picture']): ?>
					&nbsp&nbsp<img class="col-xs-offset-1" src="<?php echo base_url() ?>/uploads/exp/<?php echo $knowledge_point['id']?>/pic.jpg?<?php echo rand()?>">
				<?php endif ?>
			</div>			
		</div>	

	</div>
</div>
<div class="container">
	<div class="panel panel-primary">
		<div class="panel-heading">
			<h3 class="panel-title">相关题目列表</h3>
		</div>
		<div class="panel-body">
			

				<?php  $i=1; foreach ($questions as $question ): ?>
								<div class="form-group row">
									<!-- <label class="col-lg-1 control-label"><?php echo $i.'.';?></label> -->
									<!-- <label class="col-lg-1n cotrol-label"><?php echo $question['id'].'.';?></label> -->
									<div class="col-lg-12">
										<div style="font-weight:bold; position:relative; ">
											<div id = "question_number" style="font-weight:bold; position:relative; display:inline"><?php echo $i;?>.<div style="display:none; position:absolute; bottom:15px; lift:0;width:100px;font-size:20px;"><?php echo $question['id']?></div></div>
											&nbsp&nbsp<?=$question['content_main']?><br>
										</div>
										<?php if ($question['picture_main_id']): ?>
											<img src="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/main.jpg?<?php echo rand()?>">
										<?php endif ?>
									</div>
									<!-- <div class="col-lg-4">
										<?php if ($question['picture_main_id']): ?>
											<a class="fancybox-effects" href="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/main.jpg?<?php echo rand()?>">
												<img src="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/main_thumb.jpg?<?php echo rand()?>">
											</a>
										<?php endif ?>
									</div> -->
								</div>

								<?php if ($question['content_1'] == '0' ||$question['content_1']||$question['picture_1_id']): ?>
								<div class="form-group row">
									<!-- <label class="col-lg-1 control-label"><input type="radio" name="answer[<?php echo $i?>]" value="1" /> A</label> -->
									<div class="col-lg-12">
										<p class="question-content">&nbsp&nbsp
											&nbsp&nbspA&nbsp&nbsp<?=$question['content_1']?> 
										</p>
										<?php if ($question['picture_1_id']): ?>
											<img src="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/1.jpg?<?php echo rand()?>">
										<?php endif ?>
									</div>
									<!-- <div class="col-lg-4">
										<?php if ($question['picture_1_id']): ?>
											<a class="fancybox-effects" href="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/1.jpg?<?php echo rand()?>">
												<img src="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/1_thumb.jpg?<?php echo rand()?>">
											</a>
										<?php endif ?>
									</div> -->
								</div>
								<?php endif ?>

								<?php if ($question['content_2'] == '0' ||$question['content_2']||$question['picture_2_id']): ?>
								<div class="form-group row">
									<!-- <label class="col-lg-1 control-label"><input type="radio" name="answer[<?php echo $i?>]" value="2" /> B</label> -->
									<div class="col-lg-12">
										<p class="question-content">&nbsp&nbsp
											&nbsp&nbspB&nbsp&nbsp<?=$question['content_2']?> 
										</p>
										<?php if ($question['picture_2_id']): ?>
											<img src="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/2.jpg?<?php echo rand()?>">
										<?php endif ?>
									</div>
									<!-- <div class="col-lg-4">
										<?php if ($question['picture_2_id']): ?>
											<a class="fancybox-effects" href="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/2.jpg?<?php echo rand()?>">
												<img src="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/2_thumb.jpg?<?php echo rand()?>">
											</a>
										<?php endif ?>
									</div> -->
								</div>
								<?php endif ?>

								<?php if ($question['content_3'] == '0' ||$question['content_3']||$question['picture_3_id']): ?>
								<div class="form-group row">
									<!-- <label class="col-lg-1 control-label"><input type="radio" name="answer[<?php echo $i?>]" value="3" /> C</label> -->
									<div class="col-lg-12">
										<p class="question-content">&nbsp&nbsp
											&nbsp&nbspC&nbsp&nbsp<?=$question['content_3']?> 
										</p>
										<?php if ($question['picture_3_id']): ?>
											<img src="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/3.jpg?<?php echo rand()?>">
										<?php endif ?>
									</div>
									<!-- <div class="col-lg-4">
										<?php if ($question['picture_3_id']): ?>
											<a class="fancybox-effects" href="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/3.jpg?<?php echo rand()?>">
												<img src="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/3_thumb.jpg?<?php echo rand()?>">
											</a>
										<?php endif ?>
									</div> -->
								</div>
								<?php endif ?>

								<?php if ($question['content_4'] == '0' ||$question['content_4']||$question['picture_4_id']): ?>
								<div class="form-group row">
									<!-- <label class="col-lg-1 control-label"><input type="radio" name="answer[<?php echo $i?>]" value="4" /> D</label> -->
									<div class="col-lg-12">
										<p class="question-content">&nbsp&nbsp
											&nbsp&nbspD&nbsp&nbsp<?=$question['content_4']?> 
										</p>
										<?php if ($question['picture_4_id']): ?>
											<img src="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/4.jpg?<?php echo rand()?>">
										<?php endif ?>
									</div>
									<!-- <div class="col-lg-4">
										<?php if ($question['picture_4_id']): ?>
											<a class="fancybox-effects" href="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/4.jpg?<?php echo rand()?>">
												<img src="<?php echo base_url() ?>/uploads/<?php echo $question['id']?>/4_thumb.jpg?<?php echo rand()?>">
											</a>
										<?php endif ?>
									</div> -->
								</div>
								<?php endif ?>
								<?php if ($question['answer'] == '1') {?>
									<p class="text-success">&nbsp&nbsp答案：A</p>
									
								<?php } ?>
								<?php if ($question['answer'] == '2') {?>
									<p class="text-success">&nbsp&nbsp答案：B</p>
									
								<?php } ?>
								<?php if ($question['answer'] == '3') {?>
									<p class="text-success">&nbsp&nbsp答案：C</p>
									
								<?php } ?>
								<?php if ($question['answer'] == '4') {?>
									<p class="text-success">&nbsp&nbsp答案：D</p>
									
								<?php } ?>
								

								<hr size=5 color='black'>
								
								<?php $i++;?>
							  
						<?php endforeach; ?>
						
		</div>	
	</div>

</div>

<?php $this->load->view('teacher_home/_footer')?>